package org.osami.commons.smarthome.settopbox;

public interface ISetTopBoxComponent {
        
        
	/**
	* Send a message to the TV screen through enigma2 Web interface
	* 
	* @param messagetext Text of Message
	* @param messagetype Number from 0 to 3, 0=Yes/No, 1=Info, 2=Message, 3=Attention
	* @param timeout Can be empty or the Number of seconds the Message should disappear after.
	*
	*/
	public void SendMessage(String messagetext, int messagetype, int timeout);
        
        /**
	* Receive message from enigma2 plugin
	*
	* return String message
	*/
	public String ReceiveMessage();
        
	/**
	* Shows incoming call info on TV screen
	*
	* @param caller The name of the caller
	* @param phoneNumber The phone number of caller
	*/	
	public void receiveCall(String caller, String phoneNumber);
	
	/**
	* Shows Text message info on TV screen
	*
	* @param sender The name of the sender
	* @param phoneNumber The phone number of caller
	* @param msg The message text
	*/	
	public void receiveTextMessage(String sender, String phoneNumber, String msg);
	
	
	/**
	* Pauses playback 
	*
	*/
	public void pausePlayback();
	
	/**
	* Continues playback
	*
	*/
	public void continuePlayback();
	
	/**
	* Forward playback
	*
	*/
	public void forwardPlayback();
	
	/**
	* Change channel up
	*
	*/
	public void changeChannelUp();
	
	/**
	* Change channel down
	*
	*/
	public void changeChannelDown();
	
	/**
	* Search program by given search string.
	*
	* @param searchString The search string for the wanted program name
	* @return String reply The reply for the search as a String, formatted in XML.
	* 			See more details from https://dream.reichholf.net/wiki/Enigma2:WebInterface#EPG
	*/
	public String searchProgramByName(String searchString);
	
	/**
	* Schedules recording of an event
	*
	* @param eventId Id of the event to be recorded
	* @param serviceName A name of the service (channel name) containing the event
	*/
	public void scheduleEventRecord(int eventId, String serviceRef);

}